<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" href="/plan/css/view.css" />
    <link rel="stylesheet" type="text/css" href="/plan/css/liucheng.css"/>
    <script type="text/javascript" src="/plan/js/jquery.1.9.1.js" ></script>
    <script type="text/javascript" src="/plan/js/rem.js" ></script>
       <script type="text/javascript" src="/plan/js/layer.js" ></script>
    <title>查看计划</title>
</head>
    
<body>
<div class="planinfo_top">
    {$plan_info->department_text}的开会计划
    <img src="/plan/img/jtxia.png"/>
    <img style="display: none;" src="/plan/img/jtup.png"/>
</div>
<div class="planinfo_container">
    <ul class="order_money">
        <p class="titie">
            {$plan_info->department_text}的开会计划
            <span class="{$plan_info->status_tu_text}">{$plan_info->status_text}</span>
            <!--<span class="bohui">已驳回</span>
            <span class="shen">审批中</span>
            <span class="submit">已提交</span>
            <span class="caogao">草稿</span>-->
        </p>
        <li>
                <span class="meeting">开会周次</span>第{$plan_info->week_text}周 {$plan_info->start_time}~{$plan_info->end_time}
        </li>
        <li>
                <span class="meeting">开会场次</span>{$plan_info->season}场
        </li>
        <li>
               <span class="meeting">开会场地</span>{$plan_info->address}
         </li>
        <li>
            <span class="meeting">备注</span>
            <span class="meetinfo">{$plan_info->desc}</span>
        </li>
    </ul>
        <ul class="task_info">
            <p class="task_title">任务单</p>
            <li>已发布数量<span>{$TaskStatus[0]}</span></li>
            <li>已通过审核<span>{$TaskStatus[1]}</span></li>
            <li>未通过审核<span>{$TaskStatus[2]}</span></li>
            <li>未提交审核<span>{$TaskStatus[3]}</span></li>
            <li>审核中任务<span>{$TaskStatus[4]}</span></li>
        </ul>
        <ul class="task_info">
            <p class="task_title">现金日记账</p>
            <li>收入<span>{$plan_info->income_text}</span></li>
            <li>支出<span>{$plan_info->expenses_text}</span></li>
            <li>结余<span>{$plan_info->balance_text}</span></li>
        </ul>
      {if $plan_info.log}
        <ul class="list_info">
                <p class="liucheng_title">审批流程</p>
                {volist name="$plan_info.log" id="vo"}
                <li>
                     {if $vo.type == 1}
                        <img class="tx" src="/plan/img/tongguo.jpg"/>
                    {else}
                       <img class="tx" src="/plan/img/bohui.jpg"/>
                    {/if}
                    <p class="question">
                        <img src="{$vo.avatar_text}"/>
                        <span>{$vo.username}·{$vo.action}</span>
                        <span class="date">{:date('m/d  H:i',$vo['createtime'])}</span>
                    </p>
                    <p class="infodate">
                          {if $vo.content}
                          “{$vo.content}”
                          {/if}
                    </p>
                </li>
                 {/volist}
        </ul>
     {/if}

  <div class="sug">
          <!--   <p class="titie">审批意见</p>
            <textarea name="" rows="" cols=""></textarea> -->
    </div>
    
    <!--  <div class="button">
            <a href="#"><div class="close">驳回</div></a>
            <a href="liuyan.html"><div class="continue"><input class="pay" type="submit" value="同意"/></div></a>
    </div> -->
    {if isset($WeekModel['Score']['Check']['index']) &&  ($plan_auth['department'] == $plan_info['department']) && ($plan_info->status == 2 || $plan_info->status == -2) && $TaskStatus[1]>0 && $TaskStatus[4] == 0  }
        <div class="sug">
        </div>
        {if $plan_info->status == 2}
        <div class="button">
            <div class="again"><input class="pay" type="submit" value="终审提交"/></div>
        </div>
        {else}
        <div class="button">
            <div class="again"><input class="pay" type="submit" value="重新提交"/></div>
        </div>
        {/if}
    {/if}

</div>
<ul class="viewlist" style="margin-top: 1.2rem;">

    <p class="title">会销</p>
    <li>
        <a href="/outer/#/?weekid={$ids}">
        <p><img src="/plan/img/list16.png"/></p>
        <p>外联任务单</p>
        </a>
    </li>
    <li style="width: 1.75rem;">
        <a href="#">
        <p><img src="/plan/img/list19.png"/></p>
        <p>图书经理任务单</p>
        </a>
    </li>
</ul>
{if ($plan_auth['copy_person'] || $plan_auth['auditor'] ||  isset($WeekModel['Score']['Books']['index']) || isset($WeekModel['Score']['User']['index']) || isset($WeekModel['Score']['Season']['index'])) && isset($WeekModel['Score']) }
<ul class="viewlist">
    <p class="title">财务</p>
    {foreach name="WeekModel['Score']" key="key" item="val" }
        {if $val['WeChat']['true']}
         <li>
            <a href="/index/plan/public_view/type/{$key}/ids/{$ids}/">
            <p><img src="{$val['WeChat']['img']}"/></p>
            <p>{:GetBaseInfo('Model')[$key]}</p>
            </a>
        </li>
    {/if}
    {/foreach}
</ul>
{/if}
<ul class="viewlist">
    <p class="title">基础资料</p>
    <li>
        <a href="/agent/school/index">
        <p><img src="/plan/img/list18.png"/></p>
        <p>学校管理</p>
        </a>
    </li>
</ul>
</body>
<script>
$(function(){
    var winHeight = $(window).height();
    var topHeight = parseInt($('.planinfo_top').height()) + parseInt($('.planinfo_top').css("padding-top")) + parseInt($('.planinfo_top').css("padding-bottom"));
    $('.planinfo_container').css('height',winHeight-topHeight+'px');
    $('.planinfo_top').click(function(){
        $('.planinfo_container').toggle();
        $('.planinfo_top img').toggle();
    });
    //提交表单
    $('.pay').click(function(){
        //询问框
          var indexx = layer.open({
            content: '提交后不可更改所有信息，确定提交么？'
            ,btn: ['确定', '不要']
            ,yes: function(index){
                layer.close(indexx);
              var index = layer.open({type: 2});
                   $.ajax({
                      type: 'post',
                      url:"",
                      dataType: "json",
                      success: function(data){
                            console.log(data);
                            layer.close(index);
                           if(data.code){
                                 layer.open({
                                    content:'操作成功' ,
                                    skin: 'msg',
                                    time: 2 //2秒后自动关闭
                                });
                                 setTimeout(function () {
                                   location.reload();
                                },2000);
                            }else{
                                  layer.open({
                                    content:data.msg ,
                                    skin: 'msg',
                                    time: 2 //2秒后自动关闭
                                });
                            }
                      }
                    });
            }
            ,no:function(index){
                return false;
            }
          });
       
     });
});
</script>
</html>
